package edu.gatech.oad.antlab.m7final;
import javax.swing.JPanel;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;


public class WagonWtPanelM6 extends JPanel {

	/**
	 * This is the panel for the money stats in the Store
	 * 
	 * @author Amy Lambeth
	 * @version 1.0 10/20/2011
	 */
	
	private static final long serialVersionUID = -886679445876931013L;
		private Inventory inventory;
		private JLabel lbltotalCost;
		private JLabel lblmoneyLeftHere;
		
	/**
	 * Create the panel.
	 */
	public WagonWtPanelM6(Inventory inventory) {
		this.inventory= inventory;
		setLayout(new MigLayout("", "[141.00][152.00]", "[][]"));
		
		JLabel lblTotalCost = new JLabel("Weight Added:");
		add(lblTotalCost, "cell 0 0");
		
		lbltotalCost = new JLabel("0");
		add(lbltotalCost, "cell 1 0");
		
		JLabel lblMoneyLeft = new JLabel("Wagon Weight:");
		add(lblMoneyLeft, "cell 0 1");
		
		lblmoneyLeftHere = new JLabel("0");
		add(lblmoneyLeftHere, "cell 1 1");

	}
	
	public void updateWeightAdded(int weight){
		lbltotalCost.setText("" + weight);
		lblmoneyLeftHere.setText("" + weight);
		
	}
	
	public String getWeight(){
		return lbltotalCost.getText();
	}

}
